package com.qf.web_last.Until;

import lombok.Data;

/**
 * 宝剑锋自磨砺出，梅花香自苦寒来
 *
 * @Author:mchao
 * @Time:2025/9/29
 */
@Data
public class Result {
    private String code;
    private String msg;
    private Object data;
    public Result(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static Result success() {
        return new Result("200", "操作成功", null);
    }
    public static Result success(Object data) {
        return new Result("200", "操作成功", data);
    }

    public static Result error(String msg) {
        return new Result("500", msg, null);
    }
    public static Result error(String code, String msg) {
        return new Result(code, msg, null);
    }

}
